package com.stq.toutiao.model.response;

/**
 * @author stqsht@163.com
 * @date 2020-01-23 19:02
 */
public enum TouTiaoErrCodeEnum {
    ERRCODE_NEGATIVE_2(-2,"缺少参数必填项"),
    ERRCODE_NEGATIVE_1(-1,"系统错误"),
    SUCCESS(0,"请求成功"),
    ERRCODE_40001(40001,"http包体无法解析"),
    ERRCODE_40002(40002,"access_token错误"),
    ERRCODE_40009(40009,"key长度大于128个字节"),
    ERRCODE_40010(40010,"key和value的长度和大于1024个字节"),
    ERRCODE_40011(40011,"排行榜key对应的value值格式不对"),
    ERRCODE_40014(40014,"参数无效"),
    ERRCODE_40015(40015,"appid错误"),
    ERRCODE_40016(40016,"appname错误"),
    ERRCODE_40017(40017,"secret错误"),
    ERRCODE_40018(40018,"code错误"),
    ERRCODE_40019(40019,"anonymous_code错误"),
    ERRCODE_40020(40020,"grant_type不是client_credential"),
    ERRCODE_40021(40021,"width超过指定范围"),
    ERRCODE_40037(40037,"错误的模版id"),
    ERRCODE_40038(40038,"小程序被禁止发送消息通知"),
    ERRCODE_40039(40039,"form_id不正确，或者过期"),
    ERRCODE_40040(40040,"form_id已经被使用"),
    ERRCODE_40041(40041,"错误的页面地址"),
    ERRCODE_60001(60001,"单用户存储kv超过128对"),
    ERRCODE_60003(60003,"频率限制（目前5000次/分钟）"),



    ;
    /**
     * 错误号
     */
    private int errcode;
    /**
     * 错误信息
     */
    private String errmsg;

    private TouTiaoErrCodeEnum(int errcode, String errmsg) {
        this.errcode = errcode;
        this.errmsg = errmsg;
    }

    public int getErrcode() {
        return errcode;
    }

    public String getErrmsg() {
        return errmsg;
    }
}
